﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplicationJQueryUI.Demo02
{
    public partial class JQueryCalendarWithAjax : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //
            // Uncomment to 'fix' jquery calendar dissapearing after ajax postback

            if (ScriptManager.GetCurrent(this).IsInAsyncPostBack)
                ScriptManager.RegisterStartupScript(this, GetType(), "JQueryCal", "$(\"input[id$=TextBox2]\").datepicker();", true);
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            LiteralResult1.Text = TextBox1.Text;
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            LiteralResult2.Text = TextBox2.Text;
        }
    }
}